projects
/
project
/
bcm63xx
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d738746
)
eeprom: Suck the ifdef into eeprom_init()
author
Marek Vasut
<
[email protected]
>
Tue, 10 Nov 2015 19:53:27 +0000
(20:53 +0100)
committer
Tom Rini
<
[email protected]
>
Sun, 22 Nov 2015 02:50:24 +0000
(21:50 -0500)
Just suck the ugly ifdef around eeprom_init() call into eeprom_init()
function itself. This puts all of the ifdef mess into one place.
Signed-off-by: Marek Vasut <
[email protected]
>
Cc: Simon Glass <
[email protected]
>
Cc: Tom Rini <
[email protected]
>
Cc: Heiko Schocher <
[email protected]
>
Reviewed-by: Heiko Schocher <
[email protected]
>
common/cmd_eeprom.c
patch
|
blob
|
history
diff --git
a/common/cmd_eeprom.c
b/common/cmd_eeprom.c
index 8451d63657f7d75edcafab870d6da3dbd2e2ab15..c38c5349685ce149c78c0627f655058527e21f15 100644
(file)
--- a/
common/cmd_eeprom.c
+++ b/
common/cmd_eeprom.c
@@
-57,7
+57,7
@@
void eeprom_init(void)
{
/* SPI EEPROM */
#if defined(CONFIG_SPI) && !defined(CONFIG_ENV_EEPROM_IS_ON_I2C)
- spi_init_f
();
+ spi_init_f();
#endif
/* I2C EEPROM */
@@
-248,9
+248,7
@@
static int do_eeprom(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
off = simple_strtoul(*args++, NULL, 16);
cnt = simple_strtoul(*args++, NULL, 16);
-# if !defined(CONFIG_SPI) || defined(CONFIG_ENV_EEPROM_IS_ON_I2C)
- eeprom_init ();
-# endif /* !CONFIG_SPI */
+ eeprom_init();
if (strcmp (argv[1], "read") == 0) {
printf(fmt, dev_addr, argv[1], addr, off, cnt);